<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改宠物配置')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-petset-edit" th:object="${pNewPetset}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">外观：</label>
                <div class="col-sm-8">
                    <input name="icon" th:field="*{icon}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">携带等级：</label>
                <div class="col-sm-8">
                    <input name="levelReq" th:field="*{levelReq}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">气血成长：</label>
                <div class="col-sm-8">
                    <input name="life" th:field="*{life}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">法力值成长：</label>
                <div class="col-sm-8">
                    <input name="mana" th:field="*{mana}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">物功成长：</label>
                <div class="col-sm-8">
                    <input name="phyAttack" th:field="*{phyAttack}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">法攻成长：</label>
                <div class="col-sm-8">
                    <input name="magAttack" th:field="*{magAttack}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">速度成长：</label>
                <div class="col-sm-8">
                    <input name="speed" th:field="*{speed}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">相性：</label>
                <div class="col-sm-8">
                    <select name="polar" class="form-control m-b" th:with="type=${@dict.getType('xiangxing')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{polar}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">移动速度：</label>
                <div class="col-sm-8">
                    <input name="moveSpeed" th:field="*{moveSpeed}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">排序：</label>
                <div class="col-sm-8">
                    <input name="order" th:field="*{petOrder}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">价格：</label>
                <div class="col-sm-8">
                    <input name="price" th:field="*{price}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">天生技能：</label>
                <div class="col-sm-8">
                    <input name="skills" th:field="*{skills}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">技能目标数量：</label>
                <div class="col-sm-8">
                    <input name="targetNum" th:field="*{targetNum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">出现地图：</label>
                <div class="col-sm-8">
                    <input name="zoon" th:field="*{zoon}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">种类：</label>
                <div class="col-sm-8">
                    <select name="bigPetType" class="form-control m-b" th:with="type=${@dict.getType('pettype')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{bigPetType}"></option>
                    </select>
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "system/petset";
        $("#form-petset-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-petset-edit').serialize());
            }
        }
    </script>
</body>
</html>